#ifndef PLAYER_H_
#define PLAYER_H_

#include <grrlib.h>
#include "global.h"


class Player {
public:
	Player(int lvl_len);
	~Player();
	
	s32 GetX();
	s32 GetY();
	s32 GetScroll();
	
	void SetScroll(int val);
	
	void Move();
	
	void Draw();

private:
	bool TouchingGround();
	void CheckCollisions();
	void AnimateWalking();
	
	GRRLIB_texImg *texPlayer;
	GRRLIB_texImg *texPlayerFlip;
	GRRLIB_texImg *texColMap;
	
	s32 x, y;
	s32 vy; // used for jumping...
	s32 scrollx, scrolly; // Scroll value...
	bool jumping;
	hitboxinfo hitbox;
	
	int Life;
	
	bool flipped;
	int anim_cnt;
	int animation;
	
	int LevelLength;
	
};


#endif //PLAYER_H_